<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>获取路径</title>
</head>
<body>
    <script>
        var xhr = new XMLHttpRequest();
        xhr.open('GET', '/s/sdf.jpg', true)
        xhr.responseType = 'arraybuffer'
        xhr.onreadystatechange = function() {
            if (xhr.readyState = 4) {
                console.log(xhr.response)
            }
        }
        xhr.send();
    </script>
</body>
</html>